Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

D3D9: Port flush heuristic from D3D11 #3529

Merged
merged 2 commits into from
Jun 26, 2023
Merged

D3D9: Port flush heuristic from D3D11 #3529

merged 2 commits into from
Jun 26, 2023

Conversation

doitsujin
Copy link
Owner

@doitsujin doitsujin commented Jun 22, 2023

Needs testing.

The flush heuristic itself already works well for D3D11 in practice, with major benefits being that:

  • There is no race condition with the pending submission count, unlike in the old code
  • We can flush at CS chunk boundaries, even during extremely long command sequences where we otherwise wouldn't
  • CPU timing is no longer used as a source of information, which makes this a lot more consistent
  • Resource readback latency in general should be much lower.

@misyltoad
Copy link
Collaborator

We probably don't want to flush halfway through some commands like StretchRect, ProcessVertices, LockImage and Clear which have a couple of EmitCs'es...

A few of these can probably be changed to be a lot smarter/less shit than the code I wrote like 3 years ago to avoid that too.

@Riesi
Copy link
Contributor

Riesi commented Jun 23, 2023

This currently breaks Gothic 3, which wont continue after finishing loading a game. Not sure if Josh's remarks would fix it.

@doitsujin
Copy link
Owner Author

Gothic should be fixed.

@Riesi
Copy link
Contributor

Riesi commented Jun 25, 2023

yep works now 🍻

@misyltoad
Copy link
Collaborator

Looks fine but I still want to merge some of these EmitCses at some point..,

@misyltoad misyltoad merged commit 0f4458e into master Jun 26, 2023
@doitsujin doitsujin deleted the d3d9-flush-rework branch October 23, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants